<?php

// Namespace

namespace Loop;


// Dependencies

require_once(PATH_LOOP . 'Class/IArchiveDriver.php');


/**
 * CTarDriver allows to archive files and directories into TAR files
 * This class is the implementation of the interface IArchiveDriver
 *
 * @package		Loop
 * @category	Driver
 */

class CTarDriver implements IArchiveDriver
{
	// Properties
	
	private $paths = null;
	
	
	/**
	 *
	 */
	
	public function __construct()
	{
		$this->paths = array();
	}
	
	
	/**
	 *
	 */
	
	public function addPath($path, $alias = null)
	{
	}
	
	
	/**
	 *
	 */
	
	public function sendToBrowser($filename)
	{
	}	


	/**
	 *
	 */

	public function save($pathToFiles, $files, $name)
	{
		$output = shell_exec('cd ' . $pathToFiles . ' ; tar -cvf ' . $name . ' ' . $files);
	}
}

?>
